package com.NxIndustries.Sapphire.Widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Point;
import android.util.AttributeSet;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import com.NxIndustries.Sapphire.R;
import com.htc.preference.HtcPreference;

public class SapphireLogo extends HtcPreference {
	public static final String GRAVATAR_API = "http://www.gravatar.com/avatar/";
	public static int mDefaultAvatarSize = 200;
	public static int mLargeAvatarSize = 400;

	private String xdaThreadLink;
	private final Display mDisplay;

	public SapphireLogo(Context context, AttributeSet attrs) {
		super(context, attrs);

		TypedArray typedArray = null;
		try {
			typedArray = context.obtainStyledAttributes(attrs,
					R.styleable.DeveloperPreference);
		} finally {
			if (typedArray != null) {
				typedArray.recycle();
			}
		}
		WindowManager wm = (WindowManager) getContext().getSystemService(
				Context.WINDOW_SERVICE);
		mDisplay = wm.getDefaultDisplay();
	}

	public String getGravatarUrl(String email) {
		Point point = new Point();
		mDisplay.getSize(point);
		mDefaultAvatarSize = point.x;
		return null;
	}

	public String getGravatarUrlLarge(String email) {
		Point point = new Point();
		mDisplay.getSize(point);
		mDefaultAvatarSize = point.x;
		return null;
	}

	@Override
	protected void onBindView(View view) {
		super.onBindView(view);
		if (xdaThreadLink != null) {
		}
	}

	@Override
	protected View onCreateView(ViewGroup parent) {
		super.onCreateView(parent);
		View layout = View.inflate(getContext(), R.layout.clickable_header,
				null);
		return layout;
	}
}
